/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "cxp_tipocontribuyente")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CxpTipoContribuyente.findAll", query = "SELECT s FROM CxpTipoContribuyente s"),
    @NamedQuery(name = "CxpTipoContribuyente.findBycxpCodigoTipCon", query = "SELECT s FROM CxpTipoContribuyente s WHERE s.cxpCodigoTipCon = :cxpCodigoTipCon"),
    @NamedQuery(name = "CxpTipoContribuyente.findBycxpNombreTipCon", query = "SELECT s FROM CxpTipoContribuyente s WHERE s.cxpNombreTipCon = :cxpNombreTipCon")})
public class CxpTipoContribuyente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CXP_CODIGO_TIPCON")
    private String cxpCodigoTipCon;
    @Size(max = 30)
    @Column(name = "CXP_NOMBRE_TIPCON")
    private String cxpNombreTipCon;
    
    
    public CxpTipoContribuyente() {
    }

    public CxpTipoContribuyente(String cxpCodigoTipCon, String cxpNombreTipCon) {
        this.cxpCodigoTipCon = cxpCodigoTipCon;
        this.cxpNombreTipCon = cxpNombreTipCon;
    }

    public String getCxpCodigoTipCon() {
        return cxpCodigoTipCon;
    }

    public void setCxpCodigoTipCon(String cxpCodigoTipCon) {
        this.cxpCodigoTipCon = cxpCodigoTipCon;
    }

    public String getCxpNombreTipCon() {
        return cxpNombreTipCon;
    }

    public void setCxpNombreTipCon(String cxpNombreTipCon) {
        this.cxpNombreTipCon = cxpNombreTipCon;
    }
   

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cxpCodigoTipCon != null ? cxpCodigoTipCon.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CxpTipoContribuyente)) {
            return false;
        }
        CxpTipoContribuyente other = (CxpTipoContribuyente) object;
        if ((this.cxpCodigoTipCon == null && other.cxpCodigoTipCon != null) || (this.cxpCodigoTipCon != null && !this.cxpCodigoTipCon.equals(other.cxpCodigoTipCon))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.CxpTipoContribuyente[ cxpCodigoTipCon=" + cxpCodigoTipCon + " ]";
    }
    
}
